{% extends "base.html" %}
{% block title %}Tasks{% endblock %}
{% block head %}{{ super() }}{% endblock %}
{% block navigation %}{{ super() }}{% endblock %}
{% block more_start %}{{ super() }}{% endblock %}
{% block more %}
    <li class="nav-header">Actions</li>
    <li><a href="javascript:void(0)" onclick="createNewItem('trigger');">Add new trigger</a></li>
    <li class="nav-header">Help</li>
    <li>Triggers are what causes a job to execute. The most basic trigger is
    "periodic." Custom triggers are just like tasks, combined with a periodic
    trigger. When the trigger returns a zero value, the job will continue.
    Otherwise the job will not execute. 
{% endblock %}
{% block content %}
<div id="content">
    <h2>Triggers</h2>
    <table id="triggers" class="table table-striped">
    <tr>
        <th>Trigger Name</th>
        <th>Type</th>
        <th>Value</th>
    </tr>
    {% for t in triggers %}
        <tr>
            <td><a href="/triggers/{{t}}">{{t}}</a></td>
            <td>{{t[0]}}</td>
            <td>{{t[1]}}</td>
        </tr>
    {% endfor %}
    </table>
</div>
{% endblock %}